#!/bin/bash
str="${1:?please provide a string to reverse}"

len=${#str}
reversed=""
for ((i=len-1;i>=0;i--)); do
	reversed+="${str:i:1}"
done
echo "result: $reversed"

